<?php

namespace App\Models;


class NewsSort extends Model
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'sort_name', 'name', 'sort', 'is_show'
    ];

    /**
     * 关联新闻
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function news()
    {
        return $this->hasMany(News::class, 'sort_id');
    }
}
